package com.hongzhimei.yukicomic.adapter;



import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.hongzhimei.yukicomic.fragment.BaseFragment;

import java.util.List;


/**
 * Created by wuwei on 2016/12/20.
 */

public class CommunityAdapter extends FragmentPagerAdapter {
    String[] Ranking;
    private List<Fragment> list;//fragemtn列表

    public CommunityAdapter(List<Fragment> list, String[] Ranking, FragmentManager fm) {
        super(fm);
        this.list=list;
        this.Ranking=Ranking;
    }

    @Override
    public android.support.v4.app.Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return Ranking.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return Ranking[position];
    }
}
